﻿<UserControl
	x:Class="DeltaEngine.Editor.ProjectCreator.ProjectCreatorView"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:projectCreator="clr-namespace:DeltaEngine.Editor.ProjectCreator"
	mc:Ignorable="d" MinWidth="540" MinHeight="500"
	d:DataContext="{d:DesignInstance  
	IsDesignTimeCreatable=True}">

	<UserControl.Resources>

		<Style TargetType="Label" x:Key="DeltaLabel">
			<Setter Property="FontSize" Value="14" />
			<Setter Property="FontFamily" Value="Arial" />
			<Setter Property="FontStyle" Value="Normal" />
			<Setter Property="Background" Value="#e2e2e2" />
			<Setter Property="Foreground" Value="#FF5D5D5D" />
			<Setter Property="Padding" Value="4,6,0,0" />
		</Style>

		<Style TargetType="Label" x:Key="DeltaLabelHeading1">
			<Setter Property="FontSize" Value="18" />
			<Setter Property="FontFamily" Value="Arial" />
			<Setter Property="FontStyle" Value="Normal" />
			<Setter Property="Foreground" Value="#FF5D5D5D" />
		</Style>

		<Style TargetType="Label" x:Key="DeltaLabelHeading2">
			<Setter Property="FontSize" Value="16" />
			<Setter Property="FontFamily" Value="Arial" />
			<Setter Property="FontStyle" Value="Normal" />
			<Setter Property="Foreground" Value="#FF5D5D5D" />
		</Style>

		<Style TargetType="TextBox" x:Key="DeltaTextBox">
			<Setter Property="FontSize" Value="14" />
			<Setter Property="FontFamily" Value="Arial" />
			<Setter Property="FontStyle" Value="Normal" />
			<Setter Property="Background" Value="#FFFBFBFB" />
			<Setter Property="Foreground" Value="#FF5D5D5D" />
			<Setter Property="BorderBrush" Value="#FFB2B2B2" />
			<Setter Property="Padding" Value="3,4,0,0" />
		</Style>

		<Style TargetType="ComboBox" x:Key="DeltaComboBox">
			<Setter Property="FontSize" Value="14" />
			<Setter Property="FontFamily" Value="Arial" />
			<Setter Property="FontStyle" Value="Normal" />
			<Setter Property="Background" Value="#FFFBFBFB" />
			<Setter Property="Foreground" Value="#FF5D5D5D" />
			<Setter Property="Padding" Value="5"/>
		</Style>

		<Style TargetType="ListBox" x:Key="DeltaListBox">
			<Setter Property="FontSize" Value="14" />
			<Setter Property="FontFamily" Value="Arial" />
			<Setter Property="FontStyle" Value="Normal" />
			<Setter Property="Background" Value="#FFFBFBFB" />
			<Setter Property="Foreground" Value="#FF5D5D5D" />
		</Style>

		<Style TargetType="CheckBox" x:Key="DeltaCheckBox">
			<Setter Property="FontSize" Value="14" />
			<Setter Property="FontFamily" Value="Arial" />
			<Setter Property="FontStyle" Value="Normal" />
			<Setter Property="Foreground" Value="#FF5D5D5D" />
		</Style>

		<Style TargetType="Button" x:Key="DeltaButton">
			<Setter Property="FontSize" Value="14" />
			<Setter Property="FontFamily" Value="Arial" />
			<Setter Property="FontStyle" Value="Normal" />
			<Setter Property="Background">
				<Setter.Value>
					<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
						<GradientStop Color="#FFBBBBBB" Offset="0"/>
						<GradientStop Color="#FF9E9E9E" Offset="1"/>
					</LinearGradientBrush>
				</Setter.Value>
			</Setter>
			<Setter Property="BorderBrush" Value="Black" />
			<Setter Property="Foreground" Value="#FFFFFFFF" />
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Border Background="{TemplateBinding Background}">
							<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
						</Border>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
			<Style.Triggers>
				<Trigger Property="IsEnabled" Value="False">
					<Setter Property="Background" Value="#FFCFCFCF" />
				</Trigger>
				<MultiDataTrigger>
					<MultiDataTrigger.Conditions>
						<Condition
									Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True" />
						<Condition
									Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsEnabled}" Value="True" />
					</MultiDataTrigger.Conditions>
					<Setter Property="Background" Value="#7894d3" />
				</MultiDataTrigger>
			</Style.Triggers>
		</Style>

		<Style x:Key="ActionLabelStyle" TargetType="{x:Type Label}">
			<Setter Property="Margin" Value="10,3" />
			<Setter Property="Padding" Value="0" />
			<Setter Property="TextBlock.TextWrapping" Value="Wrap" />
			<Setter Property="FontFamily" Value="Arial" />
			<Setter Property="FontWeight" Value="Bold" />
			<Setter Property="Foreground" Value="#FF0D58DA" />
			<Style.Resources>
				<Style TargetType="TextBlock">
					<Style.Triggers>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition
									Binding="{Binding RelativeSource={RelativeSource FindAncestor,
									AncestorType=Label}, Path=IsMouseOver}" Value="True" />
								<Condition
									Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsEnabled}" Value="True" />
							</MultiDataTrigger.Conditions>
							<Setter Property="TextDecorations" Value="Underline" />
						</MultiDataTrigger>
					</Style.Triggers>
				</Style>
			</Style.Resources>
		</Style>

	</UserControl.Resources>

	<Grid Margin="0,0,0,0" Background="#FFF4F4F4">
		<Grid.RowDefinitions>
			<RowDefinition Height="12" />
			<RowDefinition Height="28" />
			<RowDefinition Height="12" />
			<RowDefinition Height="28" />
			<RowDefinition Height="12" />
			<RowDefinition Height="28" />
			<RowDefinition Height="12" />
			<RowDefinition Height="28" />
			<RowDefinition Height="30" />
			<RowDefinition />
			<RowDefinition Height="12" />
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="12" />
			<ColumnDefinition Width="90" />
			<ColumnDefinition Width="5" />
			<ColumnDefinition />
			<ColumnDefinition Width="10" />
			<ColumnDefinition Width="28" />
			<ColumnDefinition Width="18" />
			<ColumnDefinition Width="155" />
			<ColumnDefinition Width="12" />
		</Grid.ColumnDefinitions>
		<Label
			Content="Name" Style="{StaticResource DeltaLabel}" Grid.Column="1" Grid.Row="1" Margin="1,0,0,0" HorizontalAlignment="Right" Background="{x:Null}" />
		<TextBox
			Text="{Binding Path=Name, UpdateSourceTrigger=PropertyChanged}"
			Grid.Column="3" Style="{StaticResource DeltaTextBox}" Grid.Row="1" Grid.ColumnSpan="3" />
		<Label Content="Path" Style="{StaticResource DeltaLabel}" Grid.Column="1" Grid.Row="7" HorizontalAlignment="Right" Background="{x:Null}" />
		<TextBox
			Text="{Binding Path=Location, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True"
			Grid.Column="3" Style="{StaticResource DeltaTextBox}" Grid.Row="7" />
		<Button Content="..." Grid.Column="5" Grid.Row="7" Style="{StaticResource DeltaButton}" FontSize="24"
		        Click="OnBrowseUserProjectsClicked" />
		<Label Content="Starter Kit" Style="{StaticResource DeltaLabel}" Grid.Column="1" Grid.Row="3" Margin="0,2,0,10" HorizontalAlignment="Right" Background="{x:Null}" Grid.RowSpan="2" />
		<ComboBox
			ItemsSource="{Binding Path=AvailableStarterKits}"
			SelectedValue="{Binding Path=SelectedStarterKit}"
			Grid.Column="3" Grid.Row="3" Grid.ColumnSpan="3"
			Style="{StaticResource DeltaComboBox}" />
		<Label Content="Framework" Style="{StaticResource DeltaLabel}" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Right" Background="{x:Null}" />
		<ComboBox
			ItemsSource="{Binding Path=AvailableFrameworks}"
			SelectedValue="{Binding Path=SelectedFramework}"
			Grid.Column="3" Grid.Row="5" Grid.ColumnSpan="3"
			Style="{StaticResource DeltaComboBox}" />
		<Button
			Command="{Binding Path=OnCreateClicked}" Style="{StaticResource DeltaButton}"
			Grid.Column="7" Grid.Row="1" FontSize="22" FontWeight="Bold" Grid.RowSpan="7" Height="148" VerticalAlignment="Top">
			<Image Height="128" Source="../Images/ProjectCreator/CreateProjectIcon.png" Stretch="Fill" Width="128" OpacityMask="Black" />
		</Button>
		<ScrollViewer 
			Grid.Column="1" Grid.Row="9" Grid.ColumnSpan="7"
			VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden">
			<WebBrowser 
				Source="http://deltaengine.net/learn/firststeps/#projectcreator"/>
		</ScrollViewer>
	</Grid>
</UserControl>